package com.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
public class RemoteService {
    @Autowired
    RestTemplate restTemplate;

    public String sayHello() {
        String url= "http://localhost:8083/remote";
        String res = restTemplate.getForObject(url, String.class);
        return res;
    }
}
